{extend name="common/base"/}

{block name="header"}
    <li class="active"><span>1</span>{:lang('Protocols')}</li>
    <li class="active"><span>2</span>{:lang('Detection')}</li>
    <li class="active"><span>3</span>{:lang('Database')}</li>
    <li><span>4</span>{:lang('Install')}</li>
    <li><span>5</span>{:lang('Complete')}</li>
{/block}

{block name="body"}
    <?php
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_HOST_M', '127.0.0.1');
        defined('SAE_MYSQL_HOST_M') or define('SAE_MYSQL_PORT', '3306');
    ?>
    <h1>创建数据库</h1>

    <form action="{:Url('Install/step2')}" method="post" target="_self">
        <div class="create-database">
            <h2>数据库连接信息</h2>
            <table class="table-hover table">
                <tr>
                    <td>
                        <select class="form-control" name="db[]">
                            <option>mysql</option>
                        </select>
                    </td>
                    <td>
                        数据库连接类型
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="form-control" type="text" name="db[]"
                               value="{defined name='SAE_MYSQL_HOST_M'}{$Think.const.SAE_MYSQL_HOST_M}{else /}127.0.0.1{/defined}">
                    </td>
                    <td>
                        <span>数据库服务器，数据库服务器IP，一般为127.0.0.1，使用localhost可能导致网站速度变慢</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="form-control" type="text" name="db[]"
                               value="{defined name='SAE_MYSQL_DB'}{$Think.const.SAE_MYSQL_DB}{/defined}">
                    </td>
                    <td>
                        <span>数据库名</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="form-control" type="text" name="db[]"
                               value="{defined name='SAE_MYSQL_USER'}{$Think.const.SAE_MYSQL_USER}{/defined}">
                    </td>
                    <td>
                        <span>数据库用户名</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="form-control" type="password" name="db[]"
                               value="{defined name='SAE_MYSQL_PASS'}{$Think.const.SAE_MYSQL_PASS}{/defined}">
                    </td>
                    <td>
                        <span>数据库密码</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="form-control" type="text" name="db[]"
                               value="{defined name='SAE_MYSQL_PORT'}{$Think.const.SAE_MYSQL_PORT}{else /}3306{/defined}">
                    </td>
                    <td>
                        <span>数据库端口，数据库服务连接端口，一般为3306</span>
                    </td>

                </tr>
                <tr>
                    <td>
                        <input class="form-control" type="text" name="db[]" value="muucmf_">
                    </td>
                    <td>
                        <span>数据表前缀，同一个数据库运行多个系统时请修改为不同的前缀</span>
                    </td>
                </tr>

            </table>

        </div>

        <div class="create-database">
            <h2>创始人帐号信息</h2>
            <table class="table-hover table">
                <tr>
                    <td>
                        <input class="form-control" type="text" name="admin[]" value="admin">
                    </td>
                    <td>
                        <span>用户名( <span  class="text-danger">英文+数字，严禁中文与特殊字符</span> )</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="form-control" type="password" name="admin[]" value="">
                    </td>
                    <td>
                        <span>密码</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="form-control" type="password" name="admin[]" value="">
                    </td>
                    <td>
                        <span>确认密码</span>
                    </td>
                </tr>
                <tr>
                    <td>
                        <input class="form-control" type="text" name="admin[]" value="admin@admin.com">
                    </td>
                    <td>
                        <span>邮箱，请填写正确的邮箱便于收取提醒邮件</span>
                    </td>
                </tr>

            </table>
            <div></div>
        </div>
    </form>
{/block}

{block name="footer"}
    <button id="submit" type="button" class="btn btn-primary btn-large  btn-block" onclick="$('form').submit();return false;">
        {:lang('NEXT')}
    </button>
    <a class="btn btn-large btn-block btn-default" style="background: white;" href="{:Url('Install/step1')}">{:lang('PREVIOUS')}</a>
{/block}